#include "check_soa.h"
void nsError(int error ,char *domain)
{
	switch (error){

		case HOST_NOT_FOUND :
			(void) fprintf(stderr,"Unknown zone : %s \n",domain);
			break;
		case NO_DATA :
			(void) fprintf(stderr,"No NS records for %s \n",domain);
			break;
		case TRY_AGAIN :
			(void) fprintf(stderr,"No response for NS query \n");
			break;
		default:
			(void) fprintf(stderr,"Unexpected error \n");
			break;
	
	}
}


void returnCodeError(ns_rcode rcode,char * nameserver)
{
	(void) fprintf(stderr,"%: \n",nameserver);
	switch(rcode){
		case ns_r_formerr :
			(void) fprintf(stderr,"FORMERR response \n");
			break;
		case ns_r_servfail :
			(void) fprintf(stderr,"SERVFAIL response \n");
			break;
		case ns_r_nxdomain :
			(void) fprintf(stderr,"NXDOMAIN response \n");
			break;
		case ns_r_notimpl :
			(void) fprintf(stderr,"NOTIMP response \n");
			break;
		case ns_r_refused :
			(void) fprintf(stderr,"READFDS response \n");
			break;
		default :
			(void) fprintf(stderr,"unexpected return code \n");
			break;
	}
}
